/*
* Copyright (c) 2011 Connection Road.  All rights reserved.
* This program and the accompanying material are made available
* under the terms of the Eclipse Public Licnese v1.0 which is
* available at http://www.eclipse.org/legal/epl-v10.html
*/

using System;
using System.Drawing;
using System.Windows.Forms;

namespace CrSyncFilesForms.Forms
{
    public partial class CrSyncUiStatusBar : UserControl
    {

        public CrSyncUiStatusBar()
        {
            InitializeComponent();
            DefaultProgressBar = new ProgressBar {Parent = StatusBarProgress, Width = 850, Location = new Point(20, 0)};
            DefaultProgressBar.Height = 18;
            StatusBarProgress.ShowPanels = true;

        }


        public ProgressBar DefaultProgressBar{ get; set;}
        public int Progress
        {
            get { return DefaultProgressBar.Value; }
            set { DefaultProgressBar.Value = value; }
        }
        public string StatusMessage
        {
            get { return StatusBarPanelMessageStatus.Text; }
            set { StatusBarPanelMessageStatus.Text = value; }
        }

        private void CRSyncFilesStatusBarResized(object sender, EventArgs e)
        {
            StatusBarPanelMessageStatus.Width = Width - 50;
            DefaultProgressBar.Width = Width - 50;
        }
    }
}
